package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.ManageWasteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RestController
@RequestMapping(value = "manageWaste")
public class ManageWasteController {
    @Autowired
    ManageWasteService manageWasteService;

    /**
     * 获取废品详情
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getInfo")
    public ResponseParams<?> getInfo() throws Exception {
        return manageWasteService.getInfo();
    }

    /**
     * 获取废品类型列表
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getWasteTypeList")
    public ResponseParams<?> getWasteTypeList() throws Exception {
        return manageWasteService.getWasteTypeList();
    }


    /**
     * 获取废品列表
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getList")
    public ResponseParams<?> getList() throws Exception {
        return manageWasteService.getList();
    }

    /**
     * 新增或编辑废品
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "addOrEdit")
    public ResponseParams<?> addOrEdit() throws Exception {
        return manageWasteService.addOrEdit();
    }

    /**
     * 获取废品形态
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "getWasteForm")
    public ResponseParams<?> getWasteForm() throws Exception {
        return manageWasteService.getWasteForm();
    }

    /**
     * 删除废品
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "delete")
    public ResponseParams<?> delete() throws Exception {
        return manageWasteService.delete();
    }


}
